from flask import Flask
from flask_sqlalchemy import SQLAlchemy

import config


app = Flask(__name__)

# 加载配置
app.config.from_object(config)
db = SQLAlchemy(app)

class User(db.Model):
    __tablename__ = 't_user'
    id = db.Column(db.Integer, primary_key = True, autoincrement = True)
    uname = db.Column(db.String(50))
    pwd = db.Column(db.String(50))
    age = db.Column(db.Integer)

    def __repr__(self):
        return "<User %r>" % self.uname


@app.route('/')
def hello_world():  # put application's code here
    return 'Hello World!'


if __name__ == '__main__':
    app.run()
